import { loginRequest as request } from "@/utils"

export function wxCode(data:object) {
  // return request?.get?.('/user/code2session', data, { needAuth: false })
  return request?.post?.('/user/login/xcx/lq', data, { needAuth: false })
}

/**
 * 获取用户手机号码
 * @param data 
 * {
 *  code: '10033a1bbb6045adb72f256d63b294b3'	手机号获取凭证,
 *  accessToken: '484e0daf36b34618b6833d89b4af74c7' 接口调用凭证, 非必填
 *  xcxLx: 'lq' 小程序类型(联勤小程序:lq 报警人小程序：bjd ),
 * }
 * @returns 
 */
export function getUserPhoneNumber(data:object) {
  return request?.get?.('/user/query/userPhoneNumber', data, { needAuth: false })
}
